import { Component } from '@angular/core';
import {IonicPage, NavController, NavParams, ViewController} from 'ionic-angular';
import {SystemService} from "../../service/SystemService";

/**
 * Generated class for the ExpendPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@Component({
  selector: 'page-expend',
  templateUrl: 'expend.html',
    providers:[SystemService]
})
export class ExpendPage {
  public expendList:any=[];
  constructor(public navCtrl: NavController, public navParams: NavParams,public view: ViewController,) {
    this.expendList = navParams.data.list;
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ExpendPage');
  }

    selectHandler(item){
        let newItem = {
            name: item.MingCheng,
            sxId:item.BianHao,
            fee:item.FeiYongXE
        };
        this.view.dismiss(newItem);
    }
    close(){

        //this.change.emit(this.isShow);
        if(this.view){
            this.view.dismiss(null, '', {animate: false});

        }

    }

}
